package server

import (
	"context"
	"pay/pkg"
	pb "pay/proto"
)

type Server struct {
	pb.UnimplementedPayServer
}

func (Server) CreatePay(ctx context.Context, request *pb.CreatePayRequest) (*pb.CreatePayResponse, error) {
	pay := pkg.AliPay(request.Subject, request.OrderPrice, request.OrderSn)
	return &pb.CreatePayResponse{Url: pay}, nil
}
